namespace go user

struct User {
  1: optional i64 id,
  2: optional string username,
  3: optional string role,
  4: optional string phone,
  5: optional string createTime (api.body="create_time",api.form="create_time",api.query="create_time") ,
  6: optional string deleteTime (api.body="delete_time",api.form="delete_time",api.query="delete_time") ,
  7: optional i64 status,
  8: optional string password,
}


struct Response{
    1: optional string message
}

service UserService{
  # 注册用户
  Response registerUser(1: User req) (api.post = "/user/register")
  # 登录
  User login(1: User req) (api.post = "/user/login")
    # 退出登录
  Response logout(1: User req) (api.get = "/user/logout")
  # 修改密码
  Response editPassword(1: User req) (api.post = "/user/editPassword")
}